<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
		<meta name="generator" content="JsDoc Toolkit" />
		
		<title>JsDoc Reference - jsf.ajax</title>

		<style type="text/css">
			/* default.css */
body
{
	font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif;
	width: 800px;
}

.header
{
	clear: both;
	background-color: #ccc;
	padding: 8px;
}

h1
{
	font-size: 150%;
	font-weight: bold;
	padding: 0;
	margin: 1em 0 0 .3em;
}

hr
{
	border: none 0;
	border-top: 1px solid #7F8FB1;
	height: 1px;
}

pre.code
{
	display: block;
	padding: 8px;
	border: 1px dashed #ccc;
}

#index
{
	margin-top: 24px;
	float: left;
	width: 160px;
	position: absolute;
	left: 8px;
	background-color: #F3F3F3;
	padding: 8px;
}

#content
{
	margin-left: 190px;
	width: 600px;
}

.classList
{
	list-style-type: none;
	padding: 0;
	margin: 0 0 0 8px;
	font-family: arial, sans-serif;
	font-size: 1em;
	overflow: auto;
}

.classList li
{
	padding: 0;
	margin: 0 0 8px 0;
}

.summaryTable { width: 100%; }

h1.classTitle
{
	font-size:170%;
	line-height:130%;
}

h2 { font-size: 110%; }
caption, div.sectionTitle
{
	background-color: #7F8FB1;
	color: #fff;
	font-size:130%;
	text-align: left;
	padding: 2px 6px 2px 6px;
	border: 1px #7F8FB1 solid;
}

div.sectionTitle { margin-bottom: 8px; }
.summaryTable thead { display: none; }

.summaryTable td
{
	vertical-align: top;
	padding: 4px;
	border-bottom: 1px #7F8FB1 solid;
	border-right: 1px #7F8FB1 solid;
}

/*col#summaryAttributes {}*/
.summaryTable td.attributes
{
	border-left: 1px #7F8FB1 solid;
	width: 140px;
	text-align: right;
}

td.attributes, .fixedFont
{
	line-height: 15px;
	color: #002EBE;
	font-family: "Courier New",Courier,monospace;
	font-size: 13px;
}

.summaryTable td.nameDescription
{
	text-align: left;
	font-size: 13px;
	line-height: 15px;
}

.summaryTable td.nameDescription, .description
{
	line-height: 15px;
	padding: 4px;
	padding-left: 4px;
}

.summaryTable { margin-bottom: 8px; }

ul.inheritsList
{
	list-style: square;
	margin-left: 20px;
	padding-left: 0;
}

.detailList {
	margin-left: 20px; 
	line-height: 15px;
}
.detailList dt { margin-left: 20px; }

.detailList .heading
{
	font-weight: bold;
	padding-bottom: 6px;
	margin-left: 0;
}

.light, td.attributes, .light a:link, .light a:visited
{
	color: #777;
	font-style: italic;
}

.fineprint
{
	text-align: right;
	font-size: 10px;
}
		</style>
	</head>

	<body>
<!-- ============================== header ================================= -->	
		<!-- begin static/header.html -->
		<div id="header">
</div>
		<!-- end static/header.html -->

<!-- ============================== classes index ============================ -->
		<div id="index">
			<!-- begin publish.classesIndex -->
			<div align="center"><a href="../index.html">Class Index</a>
| <a href="../files.html">File Index</a></div>
<hr />
<h2>Classes</h2>
<ul class="classList">
	
	<li><i><a href="../symbols/_global_.html">_global_</a></i></li>
	
	<li><a href="../symbols/jsf.html">jsf</a></li>
	
	<li><a href="../symbols/jsf.ajax.html">jsf.ajax</a></li>
	
	<li><a href="../symbols/jsf.util.html">jsf.util</a></li>
	
</ul>
<hr />
			<!-- end publish.classesIndex -->
		</div>
		
		<div id="content">
<!-- ============================== class title ============================ -->
			<h1 class="classTitle">
				
				Namespace jsf.ajax
			</h1>

<!-- ============================== class summary ========================== -->			
			<p class="description">
				
			
				
The namespace for Ajax functionality.
				
				
					<br /><i>Defined in: </i> <a href="../symbols/src/_Users_rkitain_jsf_mojarra_tags_2.1.6_jsf-demo_jsf-api_src_main_resources_jsf.js.html">jsf.js</a>.
				
			</p>

<!-- ============================== constructor summary ==================== -->			
			
			<table class="summaryTable" cellspacing="0" summary="A summary of the constructor documented in the class jsf.ajax.">
				<caption>Namespace Summary</caption>
				<thead>
					<tr>
						<th scope="col">Constructor Attributes</th>
						<th scope="col">Constructor Name and Description</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td class="attributes">&nbsp;</td>
						<td class="nameDescription" >
							<div class="fixedFont">
								<b><a href="../symbols/jsf.ajax.html#constructor">jsf.ajax</a></b>
							</div>
							<div class="description">The namespace for Ajax functionality.</div>
						</td>
					</tr>
				</tbody>
			</table>
			

<!-- ============================== properties summary ===================== -->
			

<!-- ============================== methods summary ======================== -->
			
				
				
				<table class="summaryTable" cellspacing="0" summary="A summary of the methods documented in the class jsf.ajax.">
					<caption>Method Summary</caption>
					<thead>
						<tr>
							<th scope="col">Method Attributes</th>
							<th scope="col">Method Name and Description</th>
						</tr>
					</thead>
					<tbody>
					
						<tr>
							<td class="attributes">&lt;static&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">jsf.ajax.<b><a href="../symbols/jsf.ajax.html#.addOnError">addOnError</a></b>(callback)
								</div>
								<div class="description">Register a callback for error handling.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;static&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">jsf.ajax.<b><a href="../symbols/jsf.ajax.html#.addOnEvent">addOnEvent</a></b>(callback)
								</div>
								<div class="description">Register a callback for event handling.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;static&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">jsf.ajax.<b><a href="../symbols/jsf.ajax.html#.request">request</a></b>(source, event, options)
								</div>
								<div class="description"><p>Send an asynchronous Ajax request to the server.</div>
							</td>
						</tr>
					
						<tr>
							<td class="attributes">&lt;static&gt; &nbsp;</td>
							<td class="nameDescription">
								<div class="fixedFont">jsf.ajax.<b><a href="../symbols/jsf.ajax.html#.response">response</a></b>(request, context)
								</div>
								<div class="description"><p>Receive an Ajax response from the server.</div>
							</td>
						</tr>
					
					</tbody>
				</table>
				
				
				
			

<!-- ============================== constructor details ==================== -->		
			
			<div class="details"><a name="constructor"> </a>
				<div class="sectionTitle">
					Namespace Detail
				</div>
				
				<div class="fixedFont">
						<b>jsf.ajax</b>
				</div>
				
				<div class="description">
					The namespace for Ajax functionality.
					
				</div>
				
				
				
				
					
					
					
					
					
					
					

			</div>
			

<!-- ============================== field details ========================== -->		
			

<!-- ============================== method details ========================= -->		
			
				<div class="sectionTitle">
					Method Detail
				</div>
				
					<a name=".addOnError"> </a>
					<div class="fixedFont">&lt;static&gt; 
					
					
					<span class="light">jsf.ajax.</span><b>addOnError</b>(callback)
					
					</div>
					<div class="description">
						Register a callback for error handling.
<p><b>Usage:</b></p>
<pre><code>
jsf.ajax.addOnError(handleError);
...
var handleError = function handleError(data) {
...
}
</pre></code>
<p><b>Implementation Requirements:</b></p>
This function must accept a reference to an existing JavaScript function.
The JavaScript function reference must be added to a list of callbacks, making it possible
to register more than one callback by invoking <code>jsf.ajax.addOnError</code>
more than once.  This function must throw an error if the <code>callback</code>
argument is not a function.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<b>callback</b>
									
								</dt>
								<dd>a reference to a function to call on an error</dd>
							
							</dl>
						
						
						
						
						
						
						

					<hr />
				
					<a name=".addOnEvent"> </a>
					<div class="fixedFont">&lt;static&gt; 
					
					
					<span class="light">jsf.ajax.</span><b>addOnEvent</b>(callback)
					
					</div>
					<div class="description">
						Register a callback for event handling.
<p><b>Usage:</b></p>
<pre><code>
jsf.ajax.addOnEvent(statusUpdate);
...
var statusUpdate = function statusUpdate(data) {
...
}
</pre></code>
<p><b>Implementation Requirements:</b></p>
This function must accept a reference to an existing JavaScript function.
The JavaScript function reference must be added to a list of callbacks, making it possible
to register more than one callback by invoking <code>jsf.ajax.addOnEvent</code>
more than once.  This function must throw an error if the <code>callback</code>
argument is not a function.
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<b>callback</b>
									
								</dt>
								<dd>a reference to a function to call on an event</dd>
							
							</dl>
						
						
						
						
						
						
						

					<hr />
				
					<a name=".request"> </a>
					<div class="fixedFont">&lt;static&gt; 
					
					
					<span class="light">jsf.ajax.</span><b>request</b>(source, event, options)
					
					</div>
					<div class="description">
						<p>Send an asynchronous Ajax request to the server.
<p><b>Usage:</b></p>
<pre><code>
Example showing all optional arguments:

&lt;commandButton id="button1" value="submit"
    onclick="jsf.ajax.request(this,event,
      {execute:'button1',render:'status',onevent: handleEvent,onerror: handleError});return false;"/&gt;
&lt;/commandButton/&gt;
</pre></code>
<p><b>Implementation Requirements:</b></p>
This function must:
<ul>
<li>Be used within the context of a <code>form</code>.</li>
<li>Capture the element that triggered this Ajax request
(from the <code>source</code> argument, also known as the
<code>source</code> element.</li>
<li>If the <code>source</code> element is <code>null</code> or
<code>undefined</code> throw an error.</li>
<li>If the <code>source</code> argument is not a <code>string</code> or
DOM element object, throw an error.</li>
<li>If the <code>source</code> argument is a <code>string</code>, find the
DOM element for that <code>string</code> identifier.
<li>If the DOM element could not be determined, throw an error.</li>
<li>If the <code>onerror</code> and <code>onevent</code> arguments are set,
they must be functions, or throw an error.
<li>Determine the <code>source</code> element's <code>form</code>
element.</li>
<li>Get the <code>form</code> view state by calling
<a href="../symbols/jsf.html#.getViewState">jsf.getViewState</a> passing the
<code>form</code> element as the argument.</li>
<li>Collect post data arguments for the Ajax request.
<ul>
<li>The following name/value pairs are required post data arguments:
<table border="1">
<tr>
<th>name</th>
<th>value</th>
</tr>
<tr>
<td><code>javax.faces.ViewState</code></td>
<td><code>Contents of javax.faces.ViewState hidden field.  This is included when
<a href="../symbols/jsf.html#.getViewState">jsf.getViewState</a> is used.</code></td>
</tr>
<tr>
<td><code>javax.faces.partial.ajax</code></td>
<td><code>true</code></td>
</tr>
<tr>
<td><code>javax.faces.source</code></td>
<td><code>The identifier of the element that triggered this request.</code></td>
</tr>
</table>
</li>
</ul>
</li>
<li>Collect optional post data arguments for the Ajax request.
<ul>
<li>Determine additional arguments (if any) from the <code>options</code>
argument. If <code>options.execute</code> exists:
<ul>
<li>If the keyword <code>@none</code> is present, do not create and send
the post data argument <code>javax.faces.partial.execute</code>.</li>
<li>If the keyword <code>@all</code> is present, create the post data argument with
the name <code>javax.faces.partial.execute</code> and the value <code>@all</code>.</li>
<li>Otherwise, there are specific identifiers that need to be sent.  Create the post
data argument with the name <code>javax.faces.partial.execute</code> and the value as a
space delimited <code>string</code> of client identifiers.</li>
</ul>
</li>
<li>If <code>options.execute</code> does not exist, create the post data argument with the
name <code>javax.faces.partial.execute</code> and the value as the identifier of the
element that caused this request.</li>
<li>If <code>options.render</code> exists:
<ul>
<li>If the keyword <code>@none</code> is present, do not create and send
the post data argument <code>javax.faces.partial.render</code>.</li>
<li>If the keyword <code>@all</code> is present, create the post data argument with
the name <code>javax.faces.partial.render</code> and the value <code>@all</code>.</li>
<li>Otherwise, there are specific identifiers that need to be sent.  Create the post
data argument with the name <code>javax.faces.partial.render</code> and the value as a
space delimited <code>string</code> of client identifiers.</li>
</ul>
<li>If <code>options.render</code> does not exist do not create and send the
post data argument <code>javax.faces.partial.render</code>.</li>
<li>Determine additional arguments (if any) from the <code>event</code>
argument.  The following name/value pairs may be used from the
<code>event</code> object:
<ul>
<li><code>target</code> - the ID of the element that triggered the event.</li>
<li><code>captured</code> - the ID of the element that captured the event.</li>
<li><code>type</code> - the type of event (ex: onkeypress)</li>
<li><code>alt</code> - <code>true</code> if ALT key was pressed.</li>
<li><code>ctrl</code> - <code>true</code> if CTRL key was pressed.</li>
<li><code>shift</code> - <code>true</code> if SHIFT key was pressed. </li>
<li><code>meta</code> - <code>true</code> if META key was pressed. </li>
<li><code>right</code> - <code>true</code> if right mouse button
was pressed. </li>
<li><code>left</code> - <code>true</code> if left mouse button
was pressed. </li>
<li><code>keycode</code> - the key code.
</ul>
</li>
</ul>
</li>
<li>Encode the set of post data arguments.</li>
<li>Join the encoded view state with the encoded set of post data arguments
to form the <code>query string</code> that will be sent to the server.</li>
<li>Create a request <code>context</code> object and set the properties:
<ul><li><code>source</code> (the source DOM element for this request)</li>
<li><code>onerror</code> (the error handler for this request)</li>
<li><code>onevent</code> (the event handler for this request)</li></ul>
The request context will be used during error/event handling.</li>
<li>Send a <code>begin</code> event following the procedure as outlined
in the Chapter 13 "Sending Events" section of the spec prose document <a
 href="../../javadocs/overview-summary.html#prose_document">linked in the
 overview summary</a></li>
<li>Set the request header with the name: <code>Faces-Request</code> and the
value: <code>partial/ajax</code>.</li>
<li>Determine the <code>posting URL</code> as follows: If the hidden field
<code>javax.faces.encodedURL</code> is present in the submitting form, use its
value as the <code>posting URL</code>.  Otherwise, use the <code>action</code>
property of the <code>form</code> element as the <code>URL</code>.</li>
<li>Send the request as an <code>asynchronous POST</code> using the
<code>posting URL</code> that was determined in the previous step.</li>
</ul>
Form serialization should occur just before the request is sent to minimize 
the amount of time between the creation of the serialized form data and the 
sending of the serialized form data (in the case of long requests in the queue).
Before the request is sent it must be put into a queue to ensure requests
are sent in the same order as when they were initiated.  The request callback function
must examine the queue and determine the next request to be sent.  The behavior of the
request callback function must be as follows:
<ul>
<li>If the request completed successfully invoke <a href="../symbols/jsf.ajax.html#.response">jsf.ajax.response</a>
passing the <code>request</code> object.</li>
<li>If the request did not complete successfully, notify the client.</li>
<li>Regardless of the outcome of the request (success or error) every request in the
queue must be handled.  Examine the status of each request in the queue starting from
the request that has been in the queue the longest.  If the status of the request is
<code>complete</code> (readyState 4), dequeue the request (remove it from the queue).
If the request has not been sent (readyState 0), send the request.  Requests that are
taken off the queue and sent should not be put back on the queue.</li>
</ul>

</p>
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<b>source</b>
									
								</dt>
								<dd>The DOM element that triggered this Ajax request, or an id string of the
element to use as the triggering element.</dd>
							
								<dt>
									<b>event</b>
									
								</dt>
								<dd>The DOM event that triggered this Ajax request.  The
<code>event</code> argument is optional.</dd>
							
								<dt>
									<b>options</b>
									
								</dt>
								<dd>The set of available options that can be sent as
request parameters to control client and/or server side
request processing. Acceptable name/value pair options are:
<table border="1">
<tr>
<th>name</th>
<th>value</th>
</tr>
<tr>
<td><code>execute</code></td>
<td><code>space seperated list of client identifiers</code></td>
</tr>
<tr>
<td><code>render</code></td>
<td><code>space seperated list of client identifiers</code></td>
</tr>
<tr>
<td><code>onevent</code></td>
<td><code>function to callback for event</code></td>
</tr>
<tr>
<td><code>onerror</code></td>
<td><code>function to callback for error</code></td>
</tr>
<tr>
<td><code>params</code></td>
<td><code>object containing parameters to include in the request</code></td>
</tr>
</table>
The <code>options</code> argument is optional.</dd>
							
							</dl>
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Throws:</dt>
							
								<dt>
									 <b></b>
								</dt>
								<dd>Error if first required argument <code>element</code> is not specified</dd>
							
							</dl>
						
						
						
						

					<hr />
				
					<a name=".response"> </a>
					<div class="fixedFont">&lt;static&gt; 
					
					
					<span class="light">jsf.ajax.</span><b>response</b>(request, context)
					
					</div>
					<div class="description">
						<p>Receive an Ajax response from the server.
<p><b>Usage:</b></p>
<pre><code>
jsf.ajax.response(request, context);
</pre></code>
<p><b>Implementation Requirements:</b></p>
This function must evaluate the markup returned in the
<code>request.responseXML</code> object and perform the following action:
<ul>
<p>If there is no XML response returned, signal an <code>emptyResponse</code>
error. If the XML response does not follow the format as outlined
in Appendix A of the spec prose document <a
 href="../../javadocs/overview-summary.html#prose_document">linked in the
 overview summary</a> signal a <code>malformedError</code> error.  Refer to
section "Signaling Errors" in Chapter 13 of the spec prose document <a
 href="../../javadocs/overview-summary.html#prose_document">linked in the
 overview summary</a>.</p>
<p>If the response was successfully processed, send a <code>success</code>
event as outlined in Chapter 13 "Sending Events" section of the spec prose
document <a
href="../../javadocs/overview-summary.html#prose_document">linked in the
overview summary</a>.</p>
<p><i>Update Element Processing</i></p>
The <code>update</code> element is used to update a single DOM element.  The
"id" attribute of the <code>update</code> element refers to the DOM element that
will be updated.  The contents of the <code>CDATA</code> section is the data that 
will be used when updating the contents of the DOM element as specified by the
<code>&lt;update&gt;</code> element identifier.
<li>If an <code>update</code> element is found in the response
with the identifier <code>javax.faces.ViewRoot</code>:
<pre><code>&lt;update id="javax.faces.ViewRoot"&gt;
   &lt;![CDATA[...]]&gt;
&lt;/update&gt;</code></pre>
Update the entire DOM replacing the appropriate <code>head</code> and/or
<code>body</code> sections with the content from the response.</li>
<li>If an <code>update</code> element is found in the response with the identifier
<code>javax.faces.ViewState</code>:
<pre><code>&lt;update id="javax.faces.ViewState"&gt;
   &lt;![CDATA[...]]&gt;
&lt;/update&gt;</code></pre>
locate and update the submitting form's <code>javax.faces.ViewState</code> value
with the <code>CDATA</code> contents from the response.  Locate and update the 
<code>javax.faces.ViewState</code> value for all forms specified in the 
<code>render</code> target list.</li>
<li>If an <code>update</code> element is found in the response with the identifier
<code>javax.faces.ViewHead</code>:
<pre><code>&lt;update id="javax.faces.ViewHead"&gt;
   &lt;![CDATA[...]]&gt;
&lt;/update&gt;</code></pre>
update the document's <code>head</code> section with the <code>CDATA</code>
contents from the response.</li>
<li>If an <code>update</code> element is found in the response with the identifier
<code>javax.faces.ViewBody</code>:
<pre><code>&lt;update id="javax.faces.ViewBody"&gt;
   &lt;![CDATA[...]]&gt;
&lt;/update&gt;</code></pre>
update the document's <code>body</code> section with the <code>CDATA</code>
contents from the response.</li>
<li>For any other <code>&lt;update&gt;</code> element:
<pre><code>&lt;update id="update id"&gt;
   &lt;![CDATA[...]]&gt;
&lt;/update&gt;</code></pre>
Find the DOM element with the identifier that matches the
<code>&lt;update&gt;</code> element identifier, and replace its contents with
the <code>&lt;update&gt;</code> element's <code>CDATA</code> contents.</li>
</li>
<p><i>Insert Element Processing</i></p>
<li>If an <code>&lt;insert&gt;</code> element is found in the response with the
attribute <code>before</code>:
<pre><code>&lt;insert id="insert id" before="before id"&gt;
   &lt;![CDATA[...]]&gt;
&lt;/insert&gt;</code></pre>
<ul>
<li>Extract this <code>&lt;insert&gt;</code> element's <code>CDATA</code> contents
from the response.</li>
<li>Find the DOM element whose identifier matches <code>before id</code> and insert
the <code>&lt;insert&gt;</code> element's <code>CDATA</code> content before
the DOM element in the document.</li>
</ul>
</li>
<li>If an <code>&lt;insert&gt;</code> element is found in the response with the
attribute <code>after</code>:
<pre><code>&lt;insert id="insert id" after="after id"&gt;
   &lt;![CDATA[...]]&gt;
&lt;/insert&gt;</code></pre>
<ul>
<li>Extract this <code>&lt;insert&gt;</code> element's <code>CDATA</code> contents
from the response.</li>
<li>Find the DOM element whose identifier matches <code>after id</code> and insert
the <code>&lt;insert&gt;</code> element's <code>CDATA</code> content after
the DOM element in the document.</li>
</ul>
</li>
<p><i>Delete Element Processing</i></p>
<li>If a <code>&lt;delete&gt;</code> element is found in the response:
<pre><code>&lt;delete id="delete id"/&gt;</code></pre>
Find the DOM element whose identifier matches <code>delete id</code> and remove it
from the DOM.</li>
<p><i>Element Attribute Update Processing</i></p>
<li>If an <code>&lt;attributes&gt;</code> element is found in the response:
<pre><code>&lt;attributes id="id of element with attribute"&gt;
   &lt;attribute name="attribute name" value="attribute value"&gt;
   ...
&lt/attributes&gt;</code></pre>
<ul>
<li>Find the DOM element that matches the <code>&lt;attributes&gt;</code> identifier.</li>
<li>For each nested <code>&lt;attribute&gt;</code> element in <code>&lt;attribute&gt;</code>,
update the DOM element attribute value (whose name matches <code>attribute name</code>),
with <code>attribute value</code>.</li>
</ul>
</li>
<p><i>JavaScript Processing</i></p>
<li>If an <code>&lt;eval&gt;</code> element is found in the response:
<pre><code>&lt;eval&gt;
   &lt;![CDATA[...JavaScript...]]&gt;
&lt;/eval&gt;</code></pre>
<ul>
<li>Extract this <code>&lt;eval&gt;</code> element's <code>CDATA</code> contents
from the response and execute it as if it were JavaScript code.</li>
</ul>
</li>
<p><i>Redirect Processing</i></p>
<li>If a <code>&lt;redirect&gt;</code> element is found in the response:
<pre><code>&lt;redirect url="redirect url"/&gt;</code></pre>
Cause a redirect to the url <code>redirect url</code>.</li>
<p><i>Error Processing</i></p>
<li>If an <code>&lt;error&gt;</code> element is found in the response:
<pre><code>&lt;error&gt;
   &lt;error-name&gt;..fully qualified class name string...&lt;error-name&gt;
   &lt;error-message&gt;&lt;![CDATA[...]]&gt;&lt;error-message&gt;
&lt;/error&gt;</code></pre>
Extract this <code>&lt;error&gt;</code> element's <code>error-name</code> contents
and the <code>error-message</code> contents. Signal a <code>serverError</code> passing
the <code>errorName</code> and <code>errorMessage</code>.  Refer to
section "Signaling Errors" in Chapter 13 of the spec prose document <a
 href="../../javadocs/overview-summary.html#prose_document">linked in the
 overview summary</a>.</li>
<p><i>Extensions</i></p>
<li>The <code>&lt;extensions&gt;</code> element provides a way for framework
implementations to provide their own information.</li>
<p><li>The implementation must check if &lt;script&gt; elements in the response can
be automatically run, as some browsers support this feature and some do not.  
If they can not be run, then scripts should be extracted from the response and
run separately.</li></p> 
</ul>

</p>
						
						
					</div>
					
					
					
						
							<dl class="detailList">
							<dt class="heading">Parameters:</dt>
							
								<dt>
									<b>request</b>
									
								</dt>
								<dd>The <code>XMLHttpRequest</code> instance that
contains the status code and response message from the server.</dd>
							
								<dt>
									<b>context</b>
									
								</dt>
								<dd>An object containing the request context, including the following properties:
the source element, per call onerror callback function, and per call onevent callback function.</dd>
							
							</dl>
						
						
						
						
							<dl class="detailList">
							<dt class="heading">Throws:</dt>
							
								<dt>
									 <b></b>
								</dt>
								<dd>Error if request contains no data</dd>
							
							</dl>
						
						
						
						

					
				
			
			
			<hr />
		</div>
		
<!-- ============================== footer ================================= -->
		<div class="fineprint" style="clear:both">
			
			Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.0.2 on Wed Jan 11 2012 08:55:26 GMT-0500 (EST)
		</div>
	</body>
</html>
